package com.pay.demo.model;

import com.pay.demo.enums.PayStatusEnum;
import com.pay.demo.model.base.PayModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @program: demo
 * @description: A通道支付流程的具体实现
 * @author: guoxh
 * @create: 2019-04-01 17:06
 **/
@Slf4j
@Component
@Scope("prototype")
public class APayModel extends PayModel {

    @Override
    public void createPayOrder() {
        log.info("创建A通道订单,订单serialsNumber:{}", this.getPayTransaction().getSerialsNumber());
    }

    @Override
    public void sendPaySms() {
        log.info("A通道支付短信,订单serialsNumber:{}", this.getPayTransaction().getSerialsNumber());
    }

    @Override
    public void payConfirm() {
        log.info("A通道确认支付,订单serialsNumber:{}", this.getPayTransaction().getSerialsNumber());
    }

    @Override
    public void finishPayOrder(PayStatusEnum payStatusEnum) {
        log.info("A通道确认订单最终状态,订单serialsNumber:{}", this.getPayTransaction().getSerialsNumber());
    }
}
